from typing import Optional
from pydantic import BaseModel

class WechatLoginRequest(BaseModel):
    code: str

class WechatUserInfo(BaseModel):
    id: Optional[int] = None
    openid: Optional[str] = None
    nickname: Optional[str] = None
    avatar_url: Optional[str] = None
    phone: Optional[str] = None
    location: Optional[str] = None

class WechatLoginResponse(BaseModel):
    access_token: str
    token_type: str
    user_info: WechatUserInfo 